/*
 * $Id: CommandTag.java,v 1.2 2009/07/06 16:48:07 afaichun Exp $
 * 
 * Copyright (C) 2008 General Electric Company. All Rights Reserved.
 * 
 * This software is the confidential and proprietary information of the General
 * Electric Company (GE). You shall not disclose this software and shall use it
 * only in accordance with the terms of the license agreement you entered into
 * with GE.
 * 
 * GE MAKES NO REPRESENTATIONS OR WARRANTIES ABOUT THE SUITABILITY OF THE
 * SOFTWARE, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED
 * WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR
 * NON-INFRINGEMENT. GE SHALL NOT BE LIABLE FOR ANY DAMAGES SUFFERED BY LICENSEE
 * AS A RESULT OF USING, MODIFYING, OR DISTRIBUTING THIS SOFTWARE OR ITS
 * DERIVATIVES.
 */
package com.ge.healthcare.autosc.onwatch.xml.tag;

import java.util.ArrayList;

public class CommandTag {
	private String startTaskId = null;
	private ArrayList<ExecTag> execs = new ArrayList<ExecTag>();
	private ArrayList<DownloadTag> downloads = new ArrayList<DownloadTag>();
	private ArrayList<UntarTag> untars = new ArrayList<UntarTag>();
	private ArrayList<UploadTag> uploads = new ArrayList<UploadTag>();
	private ArrayList<PdTag> pds = new ArrayList<PdTag>();
	
	public String getStartTaskId() {
		return startTaskId;
	}
	public void setStartTaskId(String startTaskId) {
		this.startTaskId = startTaskId;
	}
	public ArrayList<ExecTag> getExecs() {
		return execs;
	}
	public void setExecs(ArrayList<ExecTag> execs) {
		this.execs = execs;
	}
	public void addExec(ExecTag exec) {
		this.execs.add(exec);
	}
	public ArrayList<DownloadTag> getDownloads() {
		return downloads;
	}
	public void setDownloads(ArrayList<DownloadTag> downloads) {
		this.downloads = downloads;
	}
	public void addDownload(DownloadTag download) {
		this.downloads.add(download);
	}
	public ArrayList<UntarTag> getUntars() {
		return untars;
	}
	public void setUntars(ArrayList<UntarTag> untars) {
		this.untars = untars;
	}
	public void addUntar(UntarTag untar) {
		this.untars.add(untar);
	}
	public ArrayList<UploadTag> getUploads() {
		return uploads;
	}
	public void setUploads(ArrayList<UploadTag> uploads) {
		this.uploads = uploads;
	}
	public void addUpload(UploadTag upload) {
		this.uploads.add(upload);
	}
	public ArrayList<PdTag> getPds() {
		return pds;
	}
	public void setPds(ArrayList<PdTag> pds) {
		this.pds = pds;
	}
	public void addPds(PdTag pd) {
		this.pds.add(pd);
	}
	public String toString() {
		StringBuffer msg = new StringBuffer();
		msg.append(CommandTag.class.getName()).append(":\n");
		msg.append("{startTaskId: ").append(getStartTaskId()).append("}");
		for(ExecTag execTag: execs) {
			msg.append(execTag.toString());
		}
		for(DownloadTag downloadTag: downloads) {
			msg.append(downloadTag.toString());
		}
		for(UntarTag untarTag: untars) {
			msg.append(untarTag.toString());
		}
		for(UploadTag uploadTag: uploads) {
			msg.append(uploadTag.toString());
		}
		for(PdTag pdTag: pds) {
			msg.append(pdTag.toString());
		}
		msg.append("\n");
		return msg.toString();
	}
}
